<?php
class Test extends CI_Controller {
	function __construct() {
		parent::__construct();
	}

	public function accueil(){
	    $this->load->view('/accueil');
	}

	public function testCollection(){
	    $this->collection->add("1 chaîne");
	    $this->collection->add("2 chaînes");
	    foreach ($this->collection->getItems() as $value)
	    echo($value."<br>");
	}

	public function session() {
		$session_id = $this->session->userdata('session_id');
		$this->session->set_userdata('moi','gui');
		echo $session_id;
	}
	
	public function showVarSession(){
		$user = $this->session->userdata('moi');
		if ($user!=null)
			echo($user);
		else{
			echo("Pas de session");
		}
	}
	
	public function destructSession(){
		$this->session->sess_destroy();
	}
}
?>